Error while parsing config CalendarServer

Hello-


Ive recently upgraded to 10.11.4 and Server 5.1 from Server 4.x. The calendar service is not running properly, as seen in the console log:


Mar 31 02:26:54 calendar com.apple.xpc.launchd[1] (org.calendarserver.agent): Service only ran for 0 seconds. Pushing respawn out by 10 seconds


Looking at the /Library/Server/Calendar and Contacts/Logs/servermgr_calendar.log, I see:


[cal] 3/31/16, 2:24:30 AM PDT : Read Settings

[cal] 3/31/16, 2:24:30 AM PDT : Asking calendarserver_config for a readConfig

[cal] 3/31/16, 2:24:32 AM PDT : Returned from calendarserver_config

[cal] 3/31/16, 2:24:32 AM PDT : StandardError returned from config utility:

Traceback (most recent call last):

File "/Applications/Server.app/Contents/ServerRoot/usr/sbin/calendarserver_config", line 12, in <module>

load_entry_point('CalendarServer==8.0a1+unknown', 'console_scripts', 'calendarserver_config')()

File "/Applications/Server.app/Contents/ServerRoot/Library/CalendarServer/lib/python 2.7/site-packages/calendarserver/tools/config.py", line 196, in main

config.load(configFileName)

File "/Applications/Server.app/Contents/ServerRoot/Library/CalendarServer/lib/python 2.7/site-packages/twistedcaldav/config.py", line 273, in load

self.update(configDict)

File "/Applications/Server.app/Contents/ServerRoot/Library/CalendarServer/lib/python 2.7/site-packages/twistedcaldav/config.py", line 262, in update

hook(self._data, reloading=reloading)

File "/Applications/Server.app/Contents/ServerRoot/Library/CalendarServer/lib/python 2.7/site-packages/twistedcaldav/stdconfig.py", line 1640, in _updateLogLevels

for namespace, levelName in configDict["LogLevels"].iteritems():

AttributeError: 'str' object has no attribute 'iteritems'


[cal] 3/31/16, 2:24:32 AM PDT : Error while parsing calendarserver_config output

Error Domain=NSCocoaErrorDomain Code=3840 "Cannot parse a NULL or zero-length data" UserInfo={NSDebugDescription=Cannot parse a NULL or zero-length data}

[cal] 3/31/16, 2:24:32 AM PDT : Could not get settings from calendarserver_config


So I edited out the "LogLevels" key and string from the /Library/Server/Calendar and Contacts/Config/caldavd-system.plist and tried to start the service to no avail. It does properly read the settings now, but I see this error:


[cal] 3/31/16, 2:32:19 AM PDT : Error configuring reverse proxies

[cal] 3/31/16, 2:32:19 AM PDT : Error:

Traceback (most recent call last):

File "/Applications/Server.app/Contents/ServerRoot/usr/libexec/calendarserver_revers e_proxies", line 151, in <module>

main()

File "/Applications/Server.app/Contents/ServerRoot/usr/libexec/calendarserver_revers e_proxies", line 83, in main

enableCalDAV = keys["EnableCalDAV"] == "True"

KeyError: 'EnableCalDAV'


[cal] 3/31/16, 2:32:19 AM PDT : Output:

Error from calendarserver_config: 1, Traceback (most recent call last):

File "/Applications/Server.app/Contents/ServerRoot/usr/sbin/calendarserver_config", line 8, in <module>

from pkg_resources import load_entry_point

File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py ", line 2815, in <module>

working_set.require(__requires__)

File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py ", line 690, in require

needed = self.resolve(parse_requirements(requirements))

File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py ", line 560, in resolve

requirements = list(requirements)[::-1] # set up the stack

File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py ", line 2615, in parse_requirements

line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")

File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py ", line 2593, in scan_list

"Expected ',' or end-of-list in",line,"at",line[p:]

ValueError: ("Expected ',' or end-of-list in", 'CalendarServer==8.0a1+unknown', 'at', '+unknown')


And at this point Im stuck. It doesnt help that I dont know the proper settings for the LogLevels, as that may be helpful. Searching for examples of the config doesnt reveal any array or dictionary entries (which I believe thats what the python code is expecting).


I do see that postfix is unable to start, which may or may not be related:


Mar 31 02:35:05 calendar com.apple.xpc.launchd[1] (org.postfix.master.passive[4210]): Service exited with abnormal code: 1

Mar 31 02:35:05 calendar com.apple.xpc.launchd[1] (org.postfix.master.passive): Service only ran for 1 seconds. Pushing respawn out by 9 seconds.



Any Ideas?

Mac Pro (Late 2013), OS X El Capitan (10.11.4)

Posted on Mar 31, 2016 2:39 AM

Reply
14 replies

Mar 31, 2016 2:07 PM in response to Linc Davis

Heres the settings reported, ServerHostName has been sanitized


calendar:DefaultLogLevel = "warn"

calendar:EnableAPNS = yes

calendar:EnableSSL = yes

calendar:ServerHostName = "***"

calendar:DirectoryAddressBook:params:queryUserRecords = no

calendar:DirectoryAddressBook:params:queryPeopleRecords = no

calendar:SSLKeychainIdentity = ""

calendar:EnableSearchAddressBook = no

calendar:HTTPPort = 80

calendar:AccountingCategories:HTTP = no

calendar:AccountingCategories:Implicit Errors = no

calendar:AccountingCategories:iTIP = no

calendar:AccountingCategories:Invalid Instance = no

calendar:AccountingCategories:AutoScheduling = no

calendar:AccountingCategories:migration = no

calendar:AccountingCategories:iSchedule = no

calendar:AccountingCategories:iTIP-VFREEBUSY = no

calendar:Authentication:Digest:Enabled = yes

calendar:Authentication:Digest:AllowedOverWireUnencrypted = yes

calendar:Authentication:Kerberos:Enabled = yes

calendar:Authentication:Kerberos:AllowedOverWireUnencrypted = yes

calendar:Authentication:Wiki:Enabled = yes

calendar:Authentication:Basic:Enabled = yes

calendar:Authentication:Basic:AllowedOverWireUnencrypted = no

calendar:EnableCardDAV = yes

calendar:Scheduling:iMIP:Sending:UseSSL = yes

calendar:Scheduling:iMIP:Sending:Server = ""

calendar:Scheduling:iMIP:Sending:Address = ""

calendar:Scheduling:iMIP:Sending:Username = ""

calendar:Scheduling:iMIP:Sending:Port = 587

calendar:Scheduling:iMIP:Enabled = no

calendar:Scheduling:iMIP:Receiving:UseSSL = yes

calendar:Scheduling:iMIP:Receiving:Server = ""

calendar:Scheduling:iMIP:Receiving:Type = ""

calendar:Scheduling:iMIP:Receiving:Username = ""

calendar:Scheduling:iMIP:Receiving:Port = 995

calendar:SSLPrivateKey = ""

calendar:LogLevels = _empty_dictionary

calendar:DataRoot = "/Library/Server/Calendar and Contacts/Data"

calendar:ServerRoot = "/Library/Server/Calendar and Contacts"

calendar:SSLCertificate = ""

calendar:EnableCalDAV = yes

calendar:Notifications:Services:APNS:Enabled = yes

calendar:EnableSACLs = yes

calendar:SSLAuthorityChain = ""

calendar:SSLPort = 443

calendar:RedirectHTTPToHTTPS = yes


Apache is not running on this server.


Thanks.

Mar 31, 2016 4:52 PM in response to Photocon

I found the Server 5.1update to be even worse than usual at updating service data, especially Calendar service data. I suggest that you export all calendar and contacts data on the clients, then wipe the corresponding service data on the Server. Finally, reimport the data on the clients. You shouldn't have to do any of this, but that's what Apple has laid on you.

Apr 2, 2016 12:20 AM in response to Linc Davis

So that doesnt seem to have helped.


Ive renamed the /Library/Server/Calendar and Contacts/Data folder, and confirmed that a new one was made, and permissions setup properly:


calendar:Calendar and Contacts root# ls -al

total 0

drwx------ 6 _calendar _calendar 204 Apr 1 23:47 .

drwxr-xr-x 32 root wheel 1088 Apr 1 23:58 ..

drwx------ 8 _calendar _calendar 272 Apr 1 23:54 Config

drwx------ 2 _calendar _calendar 68 Apr 1 23:47 Data

drwx------ 11 _calendar _calendar 374 Mar 31 00:09 Data.old

drwx------ 6 _calendar _calendar 204 Mar 31 00:09 Logs


For a moment the clients could connect and it wiped out all the data, as expected. However, now they report the so-helpful message "there was an error".


Ive trashed the Server and then re-enabled it from the trash to go through the setup again, which it did. However, in the system log I still see:


Apr 2 00:15:32 calendar com.apple.xpc.launchd[1] (org.calendarserver.agent): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.


And in the /Library/Server/Calendar and Contacts/Logs/servermgr_calendar.log I see these two python errors:


Traceback (most recent call last):

File "/Applications/Server.app/Contents/ServerRoot/usr/libexec/calendarserver_revers e_proxies", line 151, in <module>

main()

File "/Applications/Server.app/Contents/ServerRoot/usr/libexec/calendarserver_revers e_proxies", line 83, in main

enableCalDAV = keys["EnableCalDAV"] == "True"

KeyError: 'EnableCalDAV'


[cal] 4/2/16, 12:13:21 AM PDT : Output:

Error from calendarserver_config: 1, Traceback (most recent call last):

File "/Applications/Server.app/Contents/ServerRoot/usr/sbin/calendarserver_config", line 8, in <module>

from pkg_resources import load_entry_point

File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py ", line 2815, in <module>

working_set.require(__requires__)

File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py ", line 690, in require

needed = self.resolve(parse_requirements(requirements))

File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py ", line 560, in resolve

requirements = list(requirements)[::-1] # set up the stack

File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py ", line 2615, in parse_requirements

line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")

File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py ", line 2593, in scan_list

"Expected ',' or end-of-list in",line,"at",line[p:]

ValueError: ("Expected ',' or end-of-list in", 'CalendarServer==8.0a1+unknown', 'at', '+unknown')


There are no other logs that I can see, because of the loglevels error before. It would be helpful to know:


  • What is an appropriate dictionary for the LogLevels setting?
  • /Applications/Server.app/Contents/ServerRoot/usr/libexec/calendarserver_reverse_ proxies on line 83 seems to have the wrong key or me - is there a correct key?
  • /Applications/Server.app/Contents/ServerRoot/usr/sbin/calendarserver_config seems to be not formatted correctly?


Or is there another issue that is causing these issues?


Thanks

Apr 6, 2016 1:06 PM in response to Linc Davis

That didnt work. Ive removed the directory, removed the Server.app, replaced the Server.app from the trash, went through the setup process again, rebooted the server, and turned on the calendar service. Clients are not able to connect, and I still get this error:


Apr 6 13:05:40 calendar com.apple.xpc.launchd[1] (org.calendarserver.agent): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.


Ideas?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Error while parsing config CalendarServer

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.